Skip to content

Added an argument type for river.AddWorker#460

Closed
vacoo wants to merge 1 commit into
riverqueue:masterfrom
vacoo:master
Closed

Added an argument type for river.AddWorker#460
vacoo wants to merge 1 commit into
riverqueue:masterfrom
vacoo:master

Conversation

@vacoo
Copy link
Copy Markdown

@vacoo vacoo commented Jul 19, 2024

Снимок экрана 2024-07-19 в 10 25 01

@brandur
Copy link
Copy Markdown
Contributor

brandur commented Jul 19, 2024

@vacoo That type parameter will be inferred from the compiler. You can see working code here that's confirmed to be correct by the test suite:

https://github.com/riverqueue/river/blob/master/example_insert_and_work_test.go#L51

It looks like you've got a different problem somewhere. Your tooltip seems to be saying about NextRetry. Do you want to see if something weird is going on there?

@vacoo
Copy link
Copy Markdown
Author

vacoo commented Jul 19, 2024

@vacoo That type parameter will be inferred from the compiler. You can see working code here that's confirmed to be correct by the test suite:

https://github.com/riverqueue/river/blob/master/example_insert_and_work_test.go#L51

It looks like you've got a different problem somewhere. Your tooltip seems to be saying about NextRetry. Do you want to see if something weird is going on there?

The NextRetry method is already available in river.WorkerDefaults.

@brandur
Copy link
Copy Markdown
Contributor

brandur commented Jul 19, 2024

The NextRetry method is already available in river.WorkerDefaults.

Yep, I know. Are you sure you don't have any additional customization?

@brandur brandur closed this Jul 19, 2024
@vacoo
Copy link
Copy Markdown
Author

vacoo commented Jul 19, 2024

The NextRetry method is already available in river.WorkerDefaults.

Yep, I know. Are you sure you don't have any additional customization?

I don't think so. I use go land and go1.22.5 darwin/arm64
Снимок экрана 2024-07-19 в 10 45 32

@brandur
Copy link
Copy Markdown
Contributor

brandur commented Jul 19, 2024

Hm, maybe check whether the code compiles outside Goland with go build .?

If that doesn't work, then maybe you could try copying the code from the example test just in case there's a typo or something somewhere:

https://github.com/riverqueue/river/blob/master/example_insert_and_work_test.go

@vacoo
Copy link
Copy Markdown
Author

vacoo commented Jul 19, 2024

Hm, maybe check whether the code compiles outside Goland with go build .?

If that doesn't work, then maybe you could try copying the code from the example test just in case there's a typo or something somewhere:

https://github.com/riverqueue/river/blob/master/example_insert_and_work_test.go

Strangely, everything works. It just seems to be just a warning

@brandur
Copy link
Copy Markdown
Contributor

brandur commented Jul 19, 2024

Ah weird. Possibly a GoLand issue somewhere ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants